﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Interop.Word;

namespace WFL.Office.Word
{
    public class WordFont
    {
        public string Name
        {
            get { return _font.Name; }
            set { _font.Name = value; }
        }

        public bool Italic
        {
            get { return _font.Italic == -1; }
            set { _font.Italic = value ? -1 : 0; }
        }

        public bool Bold
        {
            get { return _font.Bold == -1; }//True=-1
            set { _font.Bold = value ? -1 : 0; }//False=0
        }

        public float Size
        {
            get { return _font.Size; }
            set { _font.Size = value; }
        }

        public WordFont Duplicate
        {
            get { return new WordFont(_font.Duplicate); }
        }

        internal Font _font
        {
            get;
            private set;
        }

        internal WordFont(Font font)
        {
            _font = font;
        }

        public WordFont()
            : this(new Font())
        {

        }
    }
}
